<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMiniProgramInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mini_program_infos', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('user_id');
            $table->string('title')->nullable()->comment('小程序名');
            $table->string('sub_title')->nullable()->comment('小程序副名字');
            $table->string('profile')->nullable()->comment('小程序简介');
            $table->string('appid')->nullable()->comment('小程序appid');
            $table->string('secret')->nullable()->comment('小程序secret');
            $table->string('mch_id')->nullable()->comment('微信支付商户号');
            $table->string('key')->nullable()->comment('微信支付密钥');
            $table->string('cert_path')->nullable()->comment('微信支付证书(cert.pem)');
            $table->string('key_path')->nullable()->comment('微信支付证书(key.pem)');
            $table->string('share_title')->nullable()->comment('小程序分享标题');
            $table->string('share_pic')->nullable()->comment('小程序分享图片');
            $table->string('service_phone')->nullable()->comment('客服电话');
            $table->string('service_time')->nullable()->comment('客户服务时间');
            $table->string('logo')->nullable()->comment('小程序logo');
            $table->string('bg_img')->nullable()->comment('小程序首页背景图');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mini_program_infos');
    }
}
